<!DOCTYPE html>
<html>
  <head>
    <title><%= content_for?(:title) ? yield(:title) : "Church Admin" %></title>
    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>

    <%= yield(:head) %>
  </head>
  <body>
    <!-- Header -->
    <div id="header">
      <!-- Header. Status part -->
      <div id="header-status">
        <div class="container_12">
          <div class="grid_8">
            &nbsp;
          </div>
          <div class="grid_4">
          	<% if user_signed_in? %>
              Signed in as <%= current_user.email %>
            <% else %>
              <%= link_to "Sign up", new_user_registration_path %>
              <%= link_to "Sign in", new_user_session_path %>
            <% end %>
            <a href="" id="logout"> Logout </a>
          </div>
        </div>
        <div style="clear:both;"></div>
      </div>
      <!-- End #header-status -->
      <!-- Header. Main part -->
      <div id="header-main">
        <div class="container_12">
          <div class="grid_12">
            <div id="logo">
              <ul id="nav">
                <li>
                  <a href="">Home</a>
                </li>
                <li>
                  <a href="">Dashboard</a>
                </li>
                <li>
                  <a href="">Finances</a>
                </li>
                <li>
                  <a href="">Directory</a>
                </li>
                <li>
                  <a href="">Profile</a>
                </li>
                <li>
                  <a href="">Settings</a>
                </li>
                <li id="current">
                  <a href="">Admin</a>
                </li>
              </ul>
            </div><!-- End. #Logo -->
          </div><!-- End. .grid_12-->
          <div style="clear: both;"></div>
        </div><!-- End. .container_12 -->
      </div>
      <!-- End #header-main -->
      <div style="clear: both;"></div>
      <!-- Sub navigation -->
      <div id="subnav">
        <div class="container_12">
          <div class="grid_12">
            <ul>
              <li>
                <%= link_to 'Churches', churches_path %>
              </li>
              <li>
                <%= link_to 'People', people_path %>
              </li>
              <li>
                <%= link_to 'Person Statuses', person_statuses_path %>
              </li>
            </ul>
          </div><!-- End. .grid_12-->
        </div><!-- End. .container_12 -->
        <div style="clear: both;"></div>
      </div>
      <!-- End #subnav -->
    </div>
    <!-- End #header -->
    <div class="container_12">
      <% flash.each do |name, msg| %>
        <%= content_tag :div, raw(msg), :id => "flash_#{name}", :class => "flash" %>
      <% end %>

      <%= yield %>
    </div>
    <!-- Footer -->
    <div style="clear:both;"></div>
    <div id="footer">
      <div class="container_12">
        <div class="grid_12">
          <!-- You can change the copyright line for your own -->
          <p>
            &copy; 2011. Church Admin
          </p>
        </div>
      </div>
      <div style="clear:both;"></div>
    </div>
    <!-- End #footer -->
  </body>
</html>